@extends('backstage.layout.master')
@section('title', '添加遮罩')
@section('style')
@stop
@section('content')
    <div class="breadcrumbs" id="breadcrumbs">
        <ul class="breadcrumb">
            <li>
                <i class="icon-home home-icon"></i>
                <a href="backstage/home">主页</a>
            </li>

            <li class="active">
                <a href="backstage/masks/list">遮罩列表</a>
            </li>
            <li>
                添加遮罩
            </li>
        </ul><!-- .breadcrumb -->
    </div>

    <div class="page-content">
        <div class="row">
            <div class="col-xs-12">
                <!-- PAGE CONTENT BEGINS -->
                <div class="page-header">
                    <h1>
                        添加遮罩
                    </h1>
                </div>
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <form id="myform" class="form-horizontal" role="form" action="backstage/masks/add" method="post" enctype="multipart/form-data">
                            <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
                            <div class="form-group {{$errors->first('original_image')!=""?'has-error':''}}">
                                <label class="col-sm-4 control-label no-padding-right" for="original_image">
                                    遮罩 </label>
                                <div class="col-sm-4">
                                    <input type="file" id="original_image" name="original_image" placeholder="遮罩">
                                </div>
                                <div class="col-sm-4">
                                    <div class="help-block col-xs-12 col-sm-reset inline">{{$errors->first('original_image')}}</div>
                                </div>
                            </div>
                            <div class="space-4"></div>
                            <div class="form-group {{$errors->first('mask_preview_image')!=""?'has-error':''}}">
                                <label class="col-sm-4 control-label no-padding-right" for="mask_preview_image">
                                    遮罩预览图 </label>

                                <div class="col-sm-4">
                                    <input type="file" id="mask_preview_image" name="mask_preview_image" placeholder="遮罩预览图">
                                </div>
                                <div class="col-sm-4">
                                    <div class="help-block col-xs-12 col-sm-reset inline">{{$errors->first('mask_preview_image')}}</div>
                                </div>
                            </div>
                            <div class="space-4"></div>
                            <div class="clearfix form-actions">
                                <div class="col-md-offset-5 col-md-7">
                                    <button class="btn btn-info" type="submit">
                                        <i class="icon-ok bigger-110"></i>
                                        保存
                                    </button>

                                    &nbsp; &nbsp; &nbsp;
                                    <button class="btn" type="reset">
                                        <i class="icon-undo bigger-110"></i>
                                        重置
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div><!-- /.col -->
                </div>
                <!-- PAGE CONTENT ENDS -->
            </div><!-- /.col -->
        </div><!-- /.row -->
    </div><!-- /.page-content -->
@stop
@section('script')
    <script src="assets/js/jquery-ui-1.10.3.custom.min.js"></script>
    <script src="assets/js/jquery.slimscroll.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#original_image,#mask_preview_image').ace_file_input({
                no_file: '还未选择图片',
                btn_choose: '选择',
                btn_change: '重新选择',
                droppable: false,
                onchange: null,
                thumbnail: true
            });
        });
    </script>
@stop